package cn.cinz.pojo;


import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/***
 * 用户实体类
 *
 */
public class User {

    private String userId;//用户id
    private String userName;//用户昵称
    private String userPwd;//用户密码
    private String userPhone;//用户手机

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date userRegisterDate;//用户注册时间

    private String userSex;//用户性别
    private int userExperience;//用户经验值
    private boolean userLogoutStatus;//用户注销状态


    public User() {
        super();
    }

    //用户登录使用
    public User(String userId, String userName, String userPwd, String userPhone) {
        this.userId = userId;
        this.userName = userName;
        this.userPwd = userPwd;
        this.userPhone = userPhone;
    }

    public User(String userName, String userPwd) {
        this.userName = userName;
        this.userPwd = userPwd;
    }

    public User(String userId, String userName, String userPwd, String userPhone, Date userRegisterDate, String userSex, int userExperience, boolean userLogoutStatus) {
        this.userId = userId;
        this.userName = userName;
        this.userPwd = userPwd;
        this.userPhone = userPhone;
        this.userRegisterDate = userRegisterDate;
        this.userSex = userSex;
        this.userExperience = userExperience;
        this.userLogoutStatus = userLogoutStatus;
    }


    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", userPwd='" + userPwd + '\'' +
                ", userPhone='" + userPhone + '\'' +
                ", userRegisterDate=" + userRegisterDate +
                ", userSex='" + userSex + '\'' +
                ", userExperience=" + userExperience +
                ", userLogoutStatus=" + userLogoutStatus +
                '}';
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    public Date getUserRegisterDate() {
        return userRegisterDate;
    }

    public void setUserRegisterDate(Date userRegisterDate) {
        this.userRegisterDate = userRegisterDate;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public int getUserExperience() {
        return userExperience;
    }

    public void setUserExperience(int userExperience) {
        this.userExperience = userExperience;
    }

    public boolean isUserLogoutStatus() {
        return userLogoutStatus;
    }

    public void setUserLogoutStatus(boolean userLogoutStatus) {
        this.userLogoutStatus = userLogoutStatus;
    }
}
